<!--
 * @Description: 
 * @Date: 2024-05-30 10:46:11
 * @LastEditTime: 2024-06-05 16:04:08
-->
<template>
  <Dialog :title="dialogTitle" v-model="historyVisible">
    <div class="pb-50px">
      <Table
        :columns="allSchemas.tableColumns"
        :data="tableObject.tableList"
        :pagination="{
          total: tableObject.total
        }"
        v-model:pageSize="tableObject.pageSize"
        v-model:currentPage="tableObject.currentPage"
      />
    </div>
    <!-- <template #footer>
      <el-button type="primary" @click="submitForm">确 定</el-button>
      <el-button @click="redeployVisible = false">取 消</el-button>
    </template> -->
  </Dialog>
</template>
<script setup lang="ts">
import * as CaseQueryRecordApi from '@/api/pro/casequeryrecord'
import { useUserStore } from '@/store/modules/user'
import { allSchemas } from './CaseQueryRecordHistory.data'
const props = defineProps(['type'])
const historyId = ref()
const { tableObject, tableMethods } = useTable({
  getListApi: CaseQueryRecordApi.getTransferResource,
  defaultParams: {
    businessId: historyId.value,
    businessType: props.type
  } // 分页接口
})
const { getList } = tableMethods

const dialogTitle = ref('转派记录') // 弹窗的标题
const historyVisible = ref(false)
const open = async (id: number, accept) => {
  historyVisible.value = true
  tableObject.params.businessId = id
  // 修改时，设置数据
  getList()
}

defineExpose({ open })
onMounted(() => {})
</script>
